
class Aminal {
    public String name;
    public int age;

    public void eat() {
        System.out.println("动物吃饭");
    }
}

class Cat extends Aminal {

    public String jiao;

    public void eat() {
        System.out.println("猫吃鱼");
    }
}

class Dog extends Aminal {
    public String jiao;



    public void eat() {

        System.out.println("狗吃骨头");
    }
}


public class Demo {

    public static void eat(Aminal a) {
        a.eat();
    }

    public static void main(String[] args) {

        Dog d = new Dog();
        Cat c = new Cat();

        eat(d);
        eat(c);

    }
}
